package com.fastloan.mgt.application.repay.model;

import com.fastloan.mgt.application.enums.AppEnum;
import com.kawins.base.baseabs.BaseModel;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author gelon
 *         createTime 2017/11/10
 */
@javax.persistence.Table(name = "ZY_APPLICATION_REPAYMENT_PLAN")
public class ZyApplicationRepaymentPlan extends BaseModel<String> {


    /**
     *
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;
    /**
     * 进件id
     */
    private String appId;
    /**
     * 计划本次还利息
     */
    private BigDecimal planPeriodInterest;
    /**
     * 还款截止日期
     */
    private Date repaymentOverdueDate;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 还款状态（0未还款 1已还款 2逾期 3多还款 4还款进程中 ，5逾期后完成，6客户经理强制完成 7提前还款）
     */
    private Integer repaymentStatus;

    @Transient
    AppEnum.RepayStatus[] repaymentStatusEnums = AppEnum.RepayStatus.values();

    /**
     * 创建人  操作用户id
     */
    private String createBy;
    /**
     * 计划本次还本金
     */
    private BigDecimal planPeriodPrincipal;
    /**
     * 实际还款金额
     */
    private BigDecimal factRepaymentAount;
    /**
     * 实际还款与计划的偏差金额
     */
    private BigDecimal offsetAmount;
    /**
     * 客户经理最后一次处理的时间
     */
    private Date customerManagerLasttime;
    /**
     * 罚息
     */
    private BigDecimal customerPenalty;

    /**
     * 第三方期数编号
     */
    private String termNo;

    public String getTermNo() {
        return termNo;
    }

    public void setTermNo(String termNo) {
        this.termNo = termNo;
    }

    public String getId() {
        return this.id;
    }

    public ZyApplicationRepaymentPlan setId(String id) {
        this.id = id;
        return this;
    }

    public String getAppId() {
        return this.appId;
    }

    public ZyApplicationRepaymentPlan setAppId(String appId) {
        this.appId = appId;
        return this;
    }

    public BigDecimal getPlanPeriodInterest() {
        return this.planPeriodInterest;
    }

    public ZyApplicationRepaymentPlan setPlanPeriodInterest(BigDecimal planPeriodInterest) {
        this.planPeriodInterest = planPeriodInterest;
        return this;
    }

    public Date getRepaymentOverdueDate() {
        return this.repaymentOverdueDate;
    }

    public ZyApplicationRepaymentPlan setRepaymentOverdueDate(Date repaymentOverdueDate) {
        this.repaymentOverdueDate = repaymentOverdueDate;
        return this;
    }

    public AppEnum.RepayStatus[] getRepaymentStatusEnums() {
        return repaymentStatusEnums;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public ZyApplicationRepaymentPlan setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Integer getRepaymentStatus() {
        return this.repaymentStatus;
    }

    public ZyApplicationRepaymentPlan setRepaymentStatus(Integer repaymentStatus) {
        this.repaymentStatus = repaymentStatus;
        return this;
    }

    public String getCreateBy() {
        return createBy;
    }

    public ZyApplicationRepaymentPlan setCreateBy(String createBy) {
        this.createBy = createBy;
        return this;
    }

    public BigDecimal getPlanPeriodPrincipal() {
        return this.planPeriodPrincipal;
    }

    public ZyApplicationRepaymentPlan setPlanPeriodPrincipal(BigDecimal planPeriodPrincipal) {
        this.planPeriodPrincipal = planPeriodPrincipal;
        return this;
    }

    public BigDecimal getFactRepaymentAount() {
        return this.factRepaymentAount;
    }

    public ZyApplicationRepaymentPlan setFactRepaymentAount(BigDecimal factRepaymentAount) {
        this.factRepaymentAount = factRepaymentAount;
        return this;
    }

    public BigDecimal getOffsetAmount() {
        return this.offsetAmount;
    }

    public ZyApplicationRepaymentPlan setOffsetAmount(BigDecimal offsetAmount) {
        this.offsetAmount = offsetAmount;
        return this;
    }

    public Date getCustomerManagerLasttime() {
        return this.customerManagerLasttime;
    }

    public ZyApplicationRepaymentPlan setCustomerManagerLasttime(Date customerManagerLasttime) {
        this.customerManagerLasttime = customerManagerLasttime;
        return this;
    }

    public BigDecimal getCustomerPenalty() {
        return this.customerPenalty;
    }

    public ZyApplicationRepaymentPlan setCustomerPenalty(BigDecimal customerPenalty) {
        this.customerPenalty = customerPenalty;
        return this;
    }
}
